#pragma once
#include "TBasis2DStd.h"

struct TInputState
{
	DWORD dwKeyW;
	DWORD dwKeyS;
	DWORD dwKeyA;
	DWORD dwKeyD;
	DWORD dwSpace;
};
enum KeyState
{
	KEY_FREE = 0, KEY_PUSH, KEY_UP, KEY_HOLD,
};

class TInput : public TSingleton<TInput>
{
private:
	friend class TSingleton<TInput>;
public:
	LRESULT MsgProc(	HWND m_hWnd, 
						UINT message, 
						WPARAM wParam, 
						LPARAM lParam);
	TInputState    m_InputState;
	DWORD		   m_dwKeyState[256];
public:
	DWORD  KeyCheck( DWORD dwCheckKey );
	bool   Init();
	bool   Frame();
	bool   Render();
	bool   Release();
public:
	TInput(void);
public:
	~TInput(void);
};
#define I_Input TInput::GetInstance()
